package com.hsgene.user.exception;

import com.hsgene.common.util.exception.ErrorCode;

/**
 * @description:
 * @projectName: hdas-geneshop-server
 * @package: com.hsgene.user.exception
 * @author: maodi
 * @createDate: 2018/11/6 17:30
 * @version: 1.0
 * Copyright: Copyright (c) 2018
 */
public enum OrganizationErrorCode implements ErrorCode {

    COMPANY_ID_IS_NOT_NULL(10800, "COMPANY_ID_IS_NULL", "公司id不能为空"),
    COMPANY_NAME_IS_NOT_NULL(10801, "COMPANY_NAME_IS_NULL", "公司名称不能为空"),
    COMPANY_NAME_IS_EXIST(10802, "COMPANY_NAME_IS_EXIST", "公司名称不能重复"),
    SELECT_COMPANY_IS_ERROR(10803, "SELECT_COMPANY_IS_ERROR", "查询公司下拉框数据源信息出错"),
    QUERY_COMPANY_IS_ERROR(10804, "QUERY_COMPANY_IS_ERROR", "查询公司信息出错"),
    COMPANY_IS_MULTI(10805, "COMPANY_IS_MULTI", "该公司信息存在多条"),
    INSERT_COMPANY_IS_ERROR(10806, "INSERT_COMPANY_IS_ERROR", "新增公司信息出错"),
    COMPANY_IS_NOT_EXIST(10807, "COMPANY_IS_NOT_EXIST", "该公司信息不存在"),
    UPDATE_COMPANY_IS_ERROR(10808, "UPDATE_COMPANY_IS_ERROR", "修改公司信息出错"),
    DELETE_COMPANY_IS_ERROR(10809, "DELETE_COMPANY_IS_ERROR", "删除公司信息出错"),
    COMPANY_HAVE_BEEN_DELETED(10810, "COMPANY_HAVE_BEEN_DELETED", "该公司信息已经被删除，不能再次被删除"),
    DEPARTMENT_ID_IS_NOT_NULL(10811, "DEPARTMENT_ID_IS_NOT_NULL", "部门id不能为空"),
    DEPARTMENT_NAME_IS_NOT_NULL(10812, "DEPARTMENT_NAME_IS_NOT_NULL", "部门名称不能为空"),
    DEPARTMENT_NAME_IS_EXIST(10813, "DEPARTMENT_NAME_IS_NOT_NULL", "部门名称不能重复"),
    SELECT_DEPARTMENT_IS_ERROR(10814, "SELECT_DEPARTMENT_IS_ERROR", "查询部门下拉框数据源信息出错"),
    QUERY_DEPARTMENT_IS_ERROR(10815, "QUERY_DEPARTMENT_IS_ERROR", "查询部门信息出错"),
    DEPARTMENT_IS_MULTI(10816, "DEPARTMENT_IS_MULTI", "该部门信息存在多条"),
    INSERT_DEPARTMENT_IS_ERROR(10817, "INSERT_DEPARTMENT_IS_ERROR", "新增部门信息出错"),
    DEPARTMENT_IS_NOT_EXIST(10818, "DEPARTMENT_IS_NOT_EXIST", "该部门信息不存在"),
    UPDATE_DEPARTMENT_IS_ERROR(10819, "UPDATE_DEPARTMENT_IS_ERROR", "修改部门信息出错"),
    DELETE_DEPARTMENT_IS_ERROR(10820, "DELETE_DEPARTMENT_IS_ERROR", "删除部门信息出错"),
    DEPARTMENT_HAVE_BEEN_DELETED(10821, "DEPARTMENT_HAVE_BEEN_DELETED", "该部门信息已经被删除，不能再次被删除"),
    POSITION_ID_IS_NOT_NULL(10822, "POSITION_ID_IS_NOT_NULL", "职位id不能为空"),
    POSITION_NAME_IS_NOT_NULL(10823, "POSITION_NAME_IS_NOT_NULL", "职位名称不能为空"),
    POSITION_NAME_IS_EXIST(10824, "POSITION_NAME_IS_EXIST", "职位名称不能重复"),
    QUERY_POSITION_IS_ERROR(10825, "QUERY_POSITION_IS_ERROR", "查询职位信息出错"),
    POSITION_IS_MULTI(10826, "POSITION_IS_MULTI", "该职位信息存在多条"),
    INSERT_POSITION_IS_ERROR(10827, "INSERT_POSITION_IS_ERROR", "新增职位信息出错"),
    POSITION_IS_NOT_EXIST(10828, "UPDATE_POSITION_ID_IS_ERROR", "修改职位信息出错"),
    UPDATE_POSITION_IS_ERROR(10829, "UPDATE_POSITION_ID_IS_ERROR", "修改职位信息出错"),
    DELETE_POSITION_IS_ERROR(10830, "DELETE_POSITION_ID_IS_ERROR", "删除职位信息出错"),
    POSITION_HAVE_BEEN_DELETED(10831, "POSITION_HAVE_BEEN_DELETED", "该职位信息已经被删除，不能再次被删除"),
    DEPARTMENT_ID_NOT_MATCH_COMPANY_ID(10832, "DEPARTMENT_ID_NOT_MATCH_COMPANY_ID", "部门id与公司id不对应"),
    COMPANY_IS_USED_CAN_NOT_DELETE(10833, "COMPANY_IS_USED_CAN_NOT_DELETE", "公司正被使用，不能删除"),
    DEPARTMENT_IS_USED_CAN_NOT_DELETE(10834, "DEPARTMENT_IS_USED_CAN_NOT_DELETE", "部门正被使用，不能删除"),
    POSITION_IS_USED_CAN_NOT_DELETE(10835, "POSITION_IS_USED_CAN_NOT_DELETE", "职位正被使用，不能删除"),
    INSERT_COMPANY_REPEAT_IS_ERROR(10836, "INSERT_COMPANY_REPEAT_IS_ERROR", "公司插入去重查询出错"),
    UPDATE_COMPANY_REPEAT_IS_ERROR(10837, "UPDATE_COMPANY_REPEAT_IS_ERROR", "公司修改去重查询出错"),
    INSERT_DEPARTMENT_REPEAT_IS_ERROR(10838, "INSERT_DEPARTMENT_REPEAT_IS_ERROR", "部门插入去重查询出错"),
    UPDATE_DEPARTMENT_REPEAT_IS_ERROR(10839, "UPDATE_DEPARTMENT_REPEAT_IS_ERROR", "部门修改去重查询出错"),
    INSERT_POSITION_REPEAT_IS_ERROR(10840, "INSERT_POSITION_REPEAT_IS_ERROR", "职位插入去重查询出错"),
    UPDATE_POSITION_REPEAT_IS_ERROR(10841, "UPDATE_POSITION_REPEAT_IS_ERROR", "职位修改去重查询出错"),
    QUERY_COMPANY_BY_ID_IS_ERROR(10842, "QUERY_COMPANY_BY_ID", "根据公司id获取公司信息出错"),
    QUERY_DEPARTMENT_BY_ID_IS_ERROR(10843, "QUERY_DEPARTMENT_BY_ID", "根据部门id获取部门信息出错"),
    QUERY_POSITION_BY_ID_IS_ERROR(10844, "QUERY_POSITION_BY_ID", "根据职位id获取职位信息出错"),
    COMPANY_IDS_IS_NOT_NULL(10845, "COMPANY_IDS_IS_NOT_NULL", "公司id数组不能为空"),
    DELETE_COMPANY_MULTI_IS_ERROR(10846, "DELETE_COMPANY_MULTI_IS_ERROR", "公司批量删除出错"),
    DEPARTMENT_IDS_IS_NOT_NULL(10847, "DEPARTMENT_IDS_IS_NOT_NULL", "部门id数组不能为空"),
    DELETE_DEPARTMENT_MULTI_IS_ERROR(10848, "DELETE_DEPARTMENT_MULTI_IS_ERROR", "部门批量删除出错"),
    POSITION_IDS_IS_NOT_NULL(10849, "POSITION_IDS_IS_NOT_NULL", "职位id数组不能为空"),
    DELETE_POSITION_MULTI_IS_ERROR(10850, "DELETE_POSITION_MULTI_IS_ERROR", "职位批量删除出错"),
    SELECT_POSITION_IS_ERROR(10851, "SELECT_POSITION_IS_ERROR", "查询职位下拉框数据源信息出错"),
    COMPANY_ID_IS_NOT_EXIST(10852, "COMPANY_ID_IS_NOT_EXIST", "公司id数据库中不存在"),
    DEPARTMENT_ID_IS_NOT_EXIST(10853, "DEPARTMENT_ID_IS_NOT_EXIST", "部门id数据库中不存在"),
    POSITION_ID_IS_NOT_EXIST(10854, "POSITION_ID_IS_NOT_EXIST", "职位id数据库中不存在"),
    ORG_NOT_EXISTED(10856, "ORG_NOT_EXISTED", "职位、部门或公司信息不存在"),
    IDS_IS_NOT_SPLIT_BY_COMMA(10855, "IDS_IS_NOT_SPLIT_BY_COMMA", "id数组不是以英文逗号分隔"),
    CAN_NOT_UPDATE_COMPANY(10856, "CAN_NOT_UPDATE_COMPANY", "不能修改公司"),
    CAN_NOT_UPDATE_DEPARTMENT(10857, "CAN_NOT_UPDATE_DEPARTMENT", "不能修改部门"),
    TESTING_AGENCY_COMPANY_DOES_NOT_EXIST(10858,"TESTING_AGENCY_COMPANY_DOES_NOT_EXIST","请添加名称为\"检测机构\"的公司"),
    THE_DETECTION_MECHANISM_PART_DOES_NOT_EXIST(10859,"THE_DETECTION_MECHANISM_PART_DOES_NOT_EXIST","请添加\"检测机构\"公司下的名称为\"检测机构\"的部门");

    /**
     * 错误码
     */
    private final int code;

    /**
     * 错误信息
     */
    private final String message;

    /**
     * 错误描述
     */
    private final String description;

    OrganizationErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String getDescription() {
        return description;
    }
}
